package uy.edu.um.ltic.server.persistence;

import static org.junit.Assert.*;

import java.util.ArrayList;

import org.junit.Test;

import uy.edu.um.ltic.exception.DataBaseException;
import uy.edu.um.ltic.server.business.Employee;

public class getAllEmployees {

	@Test
	public void test() {
		EmployeeDAOMgt oEmployee = EmployeeDAOFactory.getInstance().getEmployeeDAOMgt();
		ArrayList<Employee> oList;
		try {
			oList = oEmployee.getAllEmployees();
			assertEquals(oList.get(0).getnEmployee(), 1);
			assertEquals(oList.get(1).getnEmployee(), 2);
			assertEquals(oList.get(2).getnEmployee(), 3);
			assertEquals(oList.get(3).getnEmployee(), 4);
			assertEquals(oList.get(4).getnEmployee(), 5);
			assertEquals(oList.get(5).getnEmployee(), 6);
			assertEquals(oList.get(6).getnEmployee(), 7);
			assertEquals(oList.get(7).getnEmployee(), 666);
		} catch (DataBaseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
